import { createStore, combineReducers, applyMiddleware } from 'redux'
import listReducer from './list'
import thunk from 'redux-thunk'
import logger from 'redux-logger'

const rootReducer = combineReducers({
  list: listReducer
})

const store = createStore(rootReducer, applyMiddleware(thunk, logger))

// 定义仓库类型
export type RootState = ReturnType<typeof store.getState>

export default store